

package com.example.redis;

/**
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0
 */
public class RedisKeys {
    public static String getVersionKey(String username) {
        return "sys:version:" + username;
    }

    /**
     * yarn大数据集群计算key
     *
     * @return
     */
    public static String getPubYanrDerivedParamsKey(String tag, String name) {
        return "sys:yarn:publishderived:" + tag + ":" + name;
    }

    public static String getPubYranRuningDerivedParamsKey(String tag, String name) {
        return "sys:yarn:publishderived:" + tag + ":running:" + name;
    }

    public static String getYanrDerivedParamsKey(String tag, String name) {
        return "sys:yarn:derived:" + tag + ":" + name;
    }
    public static String getYanrDebuggerDerivedParamsKey(String tag, String name) {
        return "sys:yarn:deriveddebugger:" + tag + ":" + name;
    }
    public static String getYarnPromptlyParamsKey(String tag, String name) {
        return "sys:yarn:promptly:" + tag + ":" + name;
    }

    public static String getYarnPromptlyRuningParamsKey(String tag, String name) {
        return "sys:yarn:promptly:" + tag + ":running:" + name;
    }
    public static String getYarBbackCalculateParamsKey(String tag) {
        return tag;
    }

    public static String getYarnBackCalculateRuningParamsKey(String tag) {
        return "running_" + tag;
    }

    public static String getYarActualtimeCalculateParamsKey(String tag, String name) {
        return tag;
    }

    public static String getYarnStdCalculateRuningParamsKey(String perv, String taskId) {
        return "running_" + perv + taskId;
    }

    public static String getYarStdCalculateParamsKey(String perv, String taskId) {
        return perv + taskId;
    }
    public static String getYarnActualtimeCalculateRuningParamsKey(String tag, String name) {
        return "running_" + tag;
    }
    public static String getYanrDebuggerRuningDerivedParamsKey(String tag, String name) {
        return "sys:yarn:deriveddebugger:" + tag + ":running:" + name;
    }

    public static String getYranRuningDerivedParamsKey(String tag, String name) {
        return "sys:yarn:derived:" + tag + ":running:" + name;
    }

    public static String getYanrMeasureParamsKey(String tag, String name) {
        return "sys:yarn:measure:" + tag + ":" + name;
    }

    public static String getYranRuningMeasureParamsKey(String tag, String name) {
        return "sys:yarn:measure:" + tag + ":running:" + name;
    }

    public static String getRepeatYanrMeasureParamsKey(String tag, String name) {
        return "sys:yarn:repeatmeasure:" + tag + ":" + name;
    }

    public static String getRepeatYranRuningMeasureParamsKey(String tag, String name) {
        return "sys:yarn:repeatmeasure:" + tag + ":running:" + name;
    }
    public static String getPubRepeatYanrMeasureParamsKey(String tag, String name) {
        return "sys:yarn:repeatpublishmeasure:" + tag + ":" + name;
    }

    public static String getPubRepeatYranRuningMeasureParamsKey(String tag, String name) {
        return "sys:yarn:repeatpublishmeasure:" + tag + ":running:" + name;
    }

    public static String getPubYanrMeasureParamsKey(String tag, String name) {
        return "sys:yarn:publishmeasure:" + tag + ":" + name;
    }

    public static String getPubYranRuningMeasureParamsKey(String tag, String name) {
        return "sys:yarn:publishmeasure:" + tag + ":running:" + name;
    }

    public static String getYanrEventParamsKey(String tag, String name) {
        return "sys:yarn:event:" + tag + ":" + name;
    }

    public static String getYanrRuningEventParamsKey(String tag, String name) {
        return "sys:yarn:event:" + tag + ":running:" + name;
    }

    public static String getPubYanrEventParamsKey(String tag, String name) {
        return "sys:yarn:publishevent:" + tag + ":" + name;
    }

    public static String getPubYanrRuningEventParamsKey(String tag, String name) {
        return "sys:yarn:publishevent:" + tag + ":running:" + name;
    }

    /**
     * 系统参数Key
     */
    public static String getSysParamsKey() {
        return "sys:params";
    }

    /**
     * 登录验证码Key
     */
    public static String getLoginCaptchaKey(String uuid) {
        return "sys:captcha:" + uuid;
    }

    /**
     * 系统日志Key
     */
    public static String getSysLogKey() {
        return "sys:log";
    }

    /**
     * 用户菜单导航Key
     */
//    public static String getUserMenuNavKey(Long userId, String language) {
//        return "sys:user:nav:" + userId + "_" + language;
//    }

    /**
     * 用户菜单导航Key
     */
    public static String getUserMenuNavKey(Long userId) {
        return "sys:user:nav:" + userId;
    }

    /**
     * 用户权限标识Key
     */
    public static String getUserPermissionsKey(Long userId) {
        return "sys:user:permissions:" + userId;
    }
}
